package com.test.nnooolwdeaer.view_wooden.view_inflater_wooden;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.test.nnooolwdeaer.R;
import com.test.nnooolwdeaer.util_wooden.StringUtil_wooden;

public class BankAccountViewInflater_wooden {

    private final View mView_wooden;

    private TextView bankNameTv_wooden, bankAccountTv_wooden;
    private ImageView checkIv_wooden;
    private View clickView_wooden;

    private final int index_wooden;

    public BankAccountViewInflater_wooden(View view, int index){
        mView_wooden = view;
        this.index_wooden = index;
        bankNameTv_wooden = mView_wooden.findViewById(R.id.item_bank_account_niri_tv_bank_name);
        bankAccountTv_wooden = mView_wooden.findViewById(R.id.item_bank_account_niri_tv_bank_account);
        checkIv_wooden = mView_wooden.findViewById(R.id.item_bank_account_niri_iv_check);
        clickView_wooden = mView_wooden.findViewById(R.id.item_bank_account_niri_view_click);
    }

    public void setCheck_wooden(boolean check){
        checkIv_wooden.setBackgroundResource(check ? R.drawable.icon_item_check_true:R.drawable.icon_item_check_false);
    }

    public void setBankName_wooden(String bankName){
        bankNameTv_wooden.setText(StringUtil_wooden.getSafeString_wooden(bankName));
    }

    public void setBankAccount_wooden(String bankAccount){
        bankAccountTv_wooden.setText(StringUtil_wooden.getSafeString_wooden(bankAccount));
    }

    public void setOnClickListener_wooden(View.OnClickListener onClickListener){
        clickView_wooden.setOnClickListener(onClickListener);
    }

}
